# -*- coding: utf-8 -*-
# pywot - what's on tv today?
# Copyright (C) 2010 Ba1T <byte-f@live.it>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
# -------------------------------------------------------------------------------

from gui import *
from locale import *
from gettext import *
import os
from sys import *

class pywot:	
	def run (self, cmd):
		os.system (cmd)
		
	def img_path (self):
		return os.path.abspath (os.path.curdir) + '/img/'
		
	def __init__ (self):
		#TODO: langauge suppport
		"""(lang, enc) = getlocale () 
		LOCALE_DOMAIN = 'pywot'
		LOCALE_DIR = '/languages/' #path.join (prefix, 'local', 'share', 'locale')
		bindtextdomain (LOCALE_DOMAIN, LOCALE_DIR)
		textdomain (LOCALE_DOMAIN)
		self.ld = LOCALE_DOMAIN
		self.ldir = LOCALE_DIR
		install (LOCALE_DOMAIN)"""
		#self.glade.bindtextdomain (self.ld, self.ldir)
		#self.glade.textdomain (self.ld)

		self.progs = None
		self.progz = []
		self.notificati = []
		self.num = 0
		print "Starting gui..."
		self.gui = pwGUi (self)
		
pw = pywot ()
